package com.timguan.render.dao.persistence.cms;

import com.timguan.render.dao.domain.cms.CmsResourceConfigDO;
import com.timguan.render.dao.domain.cms.CmsResourceConfigDOExample;
import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface CmsResourceConfigDOMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_resource_config
     *
     * @mbggenerated
     */
    @SelectProvider(type=CmsResourceConfigDOSqlProvider.class, method="countByExample")
    int countByExample(CmsResourceConfigDOExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_resource_config
     *
     * @mbggenerated
     */
    @DeleteProvider(type=CmsResourceConfigDOSqlProvider.class, method="deleteByExample")
    int deleteByExample(CmsResourceConfigDOExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_resource_config
     *
     * @mbggenerated
     */
    @Delete({
        "delete from cms_resource_config",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_resource_config
     *
     * @mbggenerated
     */
    @Insert({
        "insert into cms_resource_config (id, res_type, ",
        "name, description, ",
        "value, is_delete, ",
        "gmt_create, gmt_modified)",
        "values (#{id,jdbcType=INTEGER}, #{resType,jdbcType=VARCHAR}, ",
        "#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, ",
        "#{value,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, ",
        "#{gmtCreate,jdbcType=DATE}, #{gmtModified,jdbcType=DATE})"
    })
    int insert(CmsResourceConfigDO record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_resource_config
     *
     * @mbggenerated
     */
    @InsertProvider(type=CmsResourceConfigDOSqlProvider.class, method="insertSelective")
    int insertSelective(CmsResourceConfigDO record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_resource_config
     *
     * @mbggenerated
     */
    @SelectProvider(type=CmsResourceConfigDOSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="res_type", property="resType", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="value", property="value", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_delete", property="isDelete", jdbcType=JdbcType.INTEGER),
        @Result(column="gmt_create", property="gmtCreate", jdbcType=JdbcType.DATE),
        @Result(column="gmt_modified", property="gmtModified", jdbcType=JdbcType.DATE)
    })
    List<CmsResourceConfigDO> selectByExample(CmsResourceConfigDOExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_resource_config
     *
     * @mbggenerated
     */
    @Select({
        "select",
        "id, res_type, name, description, value, is_delete, gmt_create, gmt_modified",
        "from cms_resource_config",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="res_type", property="resType", jdbcType=JdbcType.VARCHAR),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="description", property="description", jdbcType=JdbcType.VARCHAR),
        @Result(column="value", property="value", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_delete", property="isDelete", jdbcType=JdbcType.INTEGER),
        @Result(column="gmt_create", property="gmtCreate", jdbcType=JdbcType.DATE),
        @Result(column="gmt_modified", property="gmtModified", jdbcType=JdbcType.DATE)
    })
    CmsResourceConfigDO selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_resource_config
     *
     * @mbggenerated
     */
    @UpdateProvider(type=CmsResourceConfigDOSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") CmsResourceConfigDO record, @Param("example") CmsResourceConfigDOExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_resource_config
     *
     * @mbggenerated
     */
    @UpdateProvider(type=CmsResourceConfigDOSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") CmsResourceConfigDO record, @Param("example") CmsResourceConfigDOExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_resource_config
     *
     * @mbggenerated
     */
    @UpdateProvider(type=CmsResourceConfigDOSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(CmsResourceConfigDO record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cms_resource_config
     *
     * @mbggenerated
     */
    @Update({
        "update cms_resource_config",
        "set res_type = #{resType,jdbcType=VARCHAR},",
          "name = #{name,jdbcType=VARCHAR},",
          "description = #{description,jdbcType=VARCHAR},",
          "value = #{value,jdbcType=VARCHAR},",
          "is_delete = #{isDelete,jdbcType=INTEGER},",
          "gmt_create = #{gmtCreate,jdbcType=DATE},",
          "gmt_modified = #{gmtModified,jdbcType=DATE}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(CmsResourceConfigDO record);
}